package cn.sample.moreitems.init;

import cn.sample.moreitems.MoreItems;
import cn.sample.moreitems.entity.TechnologyEntity;
import cn.sample.moreitems.entity.ThrownRockEntity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

public class ModEntities {

    public static final DeferredRegister<EntityType<?>> ENTITIES =
            DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, MoreItems.MODID);

    public static final RegistryObject<EntityType<ThrownRockEntity>> THROWN_ROCK =
            ENTITIES.register("thrown_rock",
                    () -> EntityType.Builder.<ThrownRockEntity>of(ThrownRockEntity::new, MobCategory.MISC)
                            .sized(0.25F, 0.25F)
                            .clientTrackingRange(4)
                            .updateInterval(10)
                            .build("moreitems:thrown_rock"));

    public static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITIES =
            DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, MoreItems.MODID);

    public static final RegistryObject<BlockEntityType<TechnologyEntity>> FUEL_BURNER_BE =
            BLOCK_ENTITIES.register("technology_block", () ->
                    BlockEntityType
                            .Builder.of(TechnologyEntity::new, ModBlocks.TECHNOLOGY_BLOCKS.get())
                            .build(null));



}